package com.eaoa.vo.pub.base;

import java.io.Serializable;


/**
 * 
 * This is an object that contains data related to the PUB_PERMISSION table.
 * 
 * Do not modify this class because it will be overwritten if the configuration
 * file
 * 
 * related to this class is modified.
 * 
 * For more information visit <a href="http://hibernatesynch.sourceforge.net">
 * 
 * The Hibernate Synchronizer page</a>, or contact
 * 
 * <a href="mailto: jhudson8.users.sourceforge.net">Joe Hudson</a>
 * 
 * 
 * 
 * @hibernate.class
 * 
 * table="PUB_PERMISSION"
 * 
 */

public abstract class BasePubModule implements Serializable {

	private int hashCode = Integer.MIN_VALUE;

	// primary key

	 private Long moduleno;
     private Long parentno;
     private String modulenamecn;
     private String modulenameen;
     private String imgname;
     private String urlpath;
     private Long moduletype;
     private Long orderno;
     private String islock;
     private String modulepath;
     private String modulepathdesc;


	// collections

	// private java.util.Set sysRoleOperations;
	private java.util.Set pubRoles;

	// constructors

	public BasePubModule() {
		initialize();
	}

	/**
	 * 
	 * Constructor for primary key
	 * 
	 */

	public BasePubModule(java.lang.Long moduleno) {

		this.setModuleno(moduleno);

		initialize();
	}
	
	protected void initialize() {
	}
	/**
	 * 
	 * Return the unique identifier of this class
	 * 
	 * @hibernate.id
	 * 
	 * generator-class="sequence"
	 * 
	 * column="PERMISSIONID"
	 * 
	 */

	public java.lang.Long getModuleno() {

		return moduleno;

	}

	/**
	 * 
	 * Set the unique identifier of this class
	 * 
	 * @param permissionid
	 *            the new ID
	 * 
	 */

	public void setModuleno(java.lang.Long moduleno) {

		this.moduleno = moduleno;

		this.hashCode = Integer.MIN_VALUE;

	}

	//
	// public java.util.Set getSysRoleOperations() {
	//
	// return this.sysRoleOperations;
	//
	// }
	//
	// public void setSysRoleOperations(java.util.Set sysRoleOperations) {
	//
	// this.sysRoleOperations = sysRoleOperations;
	//
	// }
	//
	// public void addToSysRoleOperations(Object obj) {
	//
	// if (null == this.sysRoleOperations)
	// this.sysRoleOperations = new java.util.HashSet();
	//
	// this.sysRoleOperations.add(obj);
	//
	// }
	

	public java.util.Set getPubRoles() {
		return pubRoles;
	}

	public void setPubRoles(java.util.Set pubRoles) {
		this.pubRoles = pubRoles;
	}

	public void addToPubRoles(Object obj) {

		if (null == this.pubRoles)
			this.pubRoles = new java.util.HashSet();

		this.pubRoles.add(obj);

	}

	public boolean equals(Object obj) {

		if (null == obj)
			return false;

		if (!(obj instanceof BasePubModule))
			return false;

		else {

			BasePubModule mObj = (BasePubModule) obj;

			if (null == this.getModuleno()
					|| null == mObj.getModuleno())
				return false;

			else
				return (this.getModuleno().equals(mObj.getModuleno()));

		}

	}

	public int hashCode() {

		if (Integer.MIN_VALUE == this.hashCode) {

			if (null == this.getModuleno())
				return super.hashCode();

			else {

				String hashStr = this.getClass().getName() + ":"
						+ this.getModuleno().hashCode();

				this.hashCode = hashStr.hashCode();

			}

		}

		return this.hashCode;

	}

	public Long getParentno() {
		return parentno;
	}

	public void setParentno(Long parentno) {
		this.parentno = parentno;
	}

	public String getModulenamecn() {
		return modulenamecn;
	}

	public void setModulenamecn(String modulenamecn) {
		this.modulenamecn = modulenamecn;
	}

	public String getModulenameen() {
		return modulenameen;
	}

	public void setModulenameen(String modulenameen) {
		this.modulenameen = modulenameen;
	}

	public String getImgname() {
		return imgname;
	}

	public void setImgname(String imgname) {
		this.imgname = imgname;
	}

	public String getUrlpath() {
		return urlpath;
	}

	public void setUrlpath(String urlpath) {
		this.urlpath = urlpath;
	}

	public Long getModuletype() {
		return moduletype;
	}

	public void setModuletype(Long moduletype) {
		this.moduletype = moduletype;
	}

	public Long getOrderno() {
		return orderno;
	}

	public void setOrderno(Long orderno) {
		this.orderno = orderno;
	}

	public String getIslock() {
		return islock;
	}

	public void setIslock(String islock) {
		this.islock = islock;
	}

	public String getModulepath() {
		return modulepath;
	}

	public void setModulepath(String modulepath) {
		this.modulepath = modulepath;
	}

	public String getModulepathdesc() {
		return modulepathdesc;
	}

	public void setModulepathdesc(String modulepathdesc) {
		this.modulepathdesc = modulepathdesc;
	}
	

}